﻿@using KRM.Core
@model KRM.Core.tblLoad

@{
    Layout = null;
}
<div class="row-fluid">
    <div class="span4">
        <input type="hidden" id="LoadId" name="LoadId" value="@Model.LoadID"/>
        <h3>@Model.LoadCode</h3>
        <span>Load status:</span> <span>@Model.LP_LoadStatus.LoadStatus</span>
    </div>
    <div class="span4">
        <button type="button" class="btn btn-warning" onclick="ConfirmAllItemAndBookLoad()">Confirm All Item And Book Load</button>
    </div>
    <div class="span4">
        <button type="button" class="btn btn-primary" onclick="ReplanLoad()">Unplan Load</button>
        <button type="button" class="btn btn-primary" onclick="ConfirmBookLoad() ">Book Load</button>
        <button type="button" class="btn btn-primary" onclick="ViewBookLoadDetail(@Model.LoadID)">Refresh</button>
    </div>
</div>
<div class="row-fluid">
    <fieldset>
        <legend>Selected Item</legend>
        <div class="row-fluid">
            <div class="span3">
                <input type="hidden" id="SelectedLoadItemId" name="SelectedLoadItemId" value="0"/>
                <input type="hidden" id="SelectedOrderId" name="SelectedOrderId" value="0"/>
                Order Ref: <span id="SelectedOrderRef"></span>
            </div>
            <div class="span3">
                Order Status: <span id="SelectedOrderStatus"></span>
            </div>
            <div class="span6" style="text-align: right">
                <button type="button" class="btn btn-primary"disabled="disabled" id="btnDeclineItem" onclick="declineloaditem()">Decline Item</button>
                <button type="button" class="btn btn-primary" disabled="disabled" id="btnConfirmItem" onclick=" confirmloaditem()">Confirm Item</button>
            </div>
        </div>
    </fieldset>
</div>
<div class="row-fluid">
    <input type="checkbox" name="autoRefresh" id="autoRefresh" checked="checked"/>
    Auto refresh after confirm/decline item
</div>
<div class="row-fluid" id="divViewLoadItems">
    @Html.Action("BookLoadItems",new{loadId=Model.LoadID})
</div>
